package com.tyk.bookstore.back.system.valid.constant;

import java.util.regex.Pattern;

/**
 * @author tyk
 * @description RoleFieldValidConstant
 */
public class RoleFieldValidConstant {
    /** 角色名称 */
    public static final int NAME_MIN_LENGTH = 1;

    public static final int NAME_MAX_LENGTH = 20;

    public static final String NAME_REGEXP = "^[\\u4e00-\\u9fa5\\w-]{1,20}$";

    public static final Pattern NAME_PATTERN = Pattern.compile(NAME_REGEXP);

    /** 角色字符串 */
    public static final int CODE_MIN_LENGTH = 1;

    public static final int CODE_MAX_LENGTH = 20;

    public static final String CODE_REGEXP = "^[\\w-:*]{1,20}$";
    public static final Pattern CODE_PATTERN = Pattern.compile(CODE_REGEXP);

    /** 角色描述 */
    public static final int DESCRIPTION_MIN_LENGTH = 1;

    public static final int DESCRIPTION_MAX_LENGTH = 200;
}
